/*
 * @Author: 轻语
 * @Date: 2021-12-29 17:39:47
 * @LastEditors: 轻语
 * @LastEditTime: 2021-12-30 15:16:26
 * @Description: 
 */
const files = import.meta.globEager('./main/*.js')
const modules = {}
for (const item in files) { 
  if (Object.prototype.hasOwnProperty.call(files, item)) {
    const key = (item.replace(/(\.\/|\.js)/g, '')).split('/').slice(-1)[0]
    modules[key] = files[item].default 
  }
}
console.log(modules, 'modules')

export default modules